package com.ijunfu.study.rabbitmq.config;

import org.springframework.amqp.core.Queue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Title :
 * @Remarks:
 * @Author : Weizhiguo
 * @Version: 1.0.0
 * @Date : 2022-05-03
 */
@Configuration
public class QueueConfig {

    /**
     * 队列名称
     */
    @Value("${mq.queue.name}")
    private String name;

    @Bean
    public Queue createQueue() {
        return new Queue(name);
    }
}
